home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
fs
/
stadir.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
2KB
|
87 lines
*** /tmp/,RCSt1022250 Wed Jul 25 13:49:02 1990
--- stadir.c Mon Jul 23 11:34:26 1990
***************
*** 9,24 ****
*/
! #include "../h/const.h"
! #include "../h/type.h"
! #include "../h/error.h"
! #include "../h/stat.h"
! #include "const.h"
! #include "type.h"
#include "file.h"
#include "fproc.h"
- #include "glo.h"
#include "inode.h"
#include "param.h"
/*===========================================================================*
* do_chdir *
--- 9,22 ----
*/
! #include "fs.h"
! #include <sys/stat.h>
#include "file.h"
#include "fproc.h"
#include "inode.h"
#include "param.h"
+ FORWARD int change();
+ FORWARD int stat_inode();
+
/*===========================================================================*
* do_chdir *
***************
*** 73,77 ****
struct inode *rip;
register int r;
- extern struct inode *eat_path();
/* Try to open the new directory. */
--- 71,74 ----
***************
*** 107,111 ****
register struct inode *rip;
register int r;
- extern struct inode *eat_path();
/* Both stat() and fstat() use the same routine to do the real work. That
--- 104,107 ----
***************
*** 128,132 ****
register struct filp *rfilp;
- extern struct filp *get_filp();
/* Is the file descriptor valid? */
--- 124,127 ----
***************
*** 152,155 ****
--- 147,153 ----
vir_bytes v;
+ /* Update the atime, ctime, and mtime fields in the inode, if need be. */
+ if (rip->i_update) update_times(rip);
+
/* Fill in the statbuf struct. */
stp = &statbuf; /* set up pointer to the buffer */
***************
*** 166,172 ****
(fil_ptr->filp_mode == R_BIT)) /* on the reading end, */
stp->st_size -= fil_ptr->filp_pos; /* adjust the visible size. */
! stp->st_atime = rip->i_modtime;
! stp->st_mtime = rip->i_modtime;
! stp->st_ctime = rip->i_modtime;
/* Copy the struct to user space. */
--- 164,170 ----
(fil_ptr->filp_mode == R_BIT)) /* on the reading end, */
stp->st_size -= fil_ptr->filp_pos; /* adjust the visible size. */
! stp->st_atime = rip->i_atime;
! stp->st_mtime = rip->i_mtime;
! stp->st_ctime = rip->i_ctime;
/* Copy the struct to user space. */